<template>
	<u-popup :show="show" mode="bottom" round="22" @close="close" closeable>
		<view class="popup-wrap">
			<view class="info-wrap">
				<view class="info-item">
					<view>{{popupData.name}}</view>
					<view class="state">
						{{popupData.status}}
					</view>
				</view>
				<view class="info-item">容纳：{{popupData.num}}人</view>
				<view class="info-item">设施：{{popupData.device}}</view>
				<view class="info-item">时间：{{popupData.time}}</view>
			</view>
			<view class="button-wrap">
				<u-button class="button" :custom-style="centerButton" @click="leftButtonClick">取消会议</u-button>
			</view>
		</view>
	</u-popup>
</template>

<script>
export default {
  props: {
    showPopup: Boolean,
    popupData: {
      type: Object,
      default: () => ({}),
    },
    stateMap: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {
      centerButton: {
        border: '1px solid #999',
        color: '#333',
      },
    };
  },
  computed: {
    show() {
      return this.showPopup;
    },
  },
  methods: {
    close() {
      this.$emit('close');
    },
    leftButtonClick() {
      this.$emit('leftButtonClick');
    },
    rightButtonClick() {
      this.$emit('rightButtonClick');
    },
  },
};
</script>

<style lang="scss" scoped>
.popup-wrap{
	padding-top: 110rpx;
	.info-wrap{
		padding: 34rpx;
		border-top: 1px solid rgba(187, 187, 187, 0.14);
		border-bottom: 1px solid rgba(187, 187, 187, 0.14);
		.info-item{
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 24rpx;
			color: #101010;
			font-size: 28rpx;
		}
		.qrcode-wrap{
			display: flex;
			justify-content: center;
			align-items: center;
			padding: 50rpx 0 18rpx;
			.qrcode{
				position: relative;
				width: 320rpx;
				height: 320rpx;
				box-sizing: border-box;
				padding: 20rpx;
				border-radius: 18rpx;
				box-shadow: 0 0 12rpx 2rpx rgba(0, 0, 0, .3);
			}
			.qrcode-blur{
				content: '';
				display: flex;
				align-items: center;
				justify-content: center;
				font-weight: 600;
				font-size: 28rpx;
				position: absolute;
				inset: 0;
				border-radius: 18rpx;
				backdrop-filter: blur(12rpx);
			}
		}
		.state{
			border: 1px solid rgba(187, 187, 187, 1);
			font-size: 24rpx;
			border-radius: 6rpx;
			padding: 6rpx 0;
			width: 140rpx;
			text-align: center;
			borderColor: rgba(187, 187, 187, 1);
			background-color: rgba(240, 224, 91, 0.35);
			color: #000C17;
		}
	}
	.button-wrap{
		padding: 22rpx 100rpx;
		margin-bottom:80rpx;
		text-align:center;
		justify-content: space-between;
		.button{
			width: 200rpx;
		}
	}
}
</style>